x86: limit checks in hypercall_xlat_continuation() to actual arguments
authorJan Beulich <jbeulich@suse.com>
Thu, 27 Nov 2014 13:00:23 +0000 (14:00 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 27 Nov 2014 13:00:23 +0000 (14:00 +0100)
commit0ad715304b04739fd2fc9517ce8671d3947c7621
tree317757a5c316844b3a2f5573d6ee673f57a28600
parentd85728a3c5e112383e99fc23825fd238a4fb8c63
x86: limit checks in hypercall_xlat_continuation() to actual arguments

HVM/PVH guests can otherwise trigger the final BUG_ON() in that
function by entering 64-bit mode, setting the high halves of affected
registers to non-zero values, leaving 64-bit mode, and issuing a
hypercall that might get preempted and hence become subject to
continuation argument translation (HYPERVISOR_memory_op being the only
one possible for HVM, PVH also having the option of using
HYPERVISOR_mmuext_op). This issue got introduced when HVM code was
switched to use compat_memory_op() - neither that nor
hypercall_xlat_continuation() were originally intended to be used by
other than PV guests (which can't enter 64-bit mode and hence have no
way to alter the high halves of 64-bit registers).

This is CVE-2014-8866 / XSA-111.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/domain.c
xen/arch/x86/x86_64/compat/mm.c
xen/common/compat/memory.c
xen/include/xen/compat.h